package top.jiangqiang.qianyi.business.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.springframework.core.convert.converter.Converter;
import top.jiangqiang.qianyi.business.mapstruct.config.MapperSpringConfig;
import top.jiangqiang.qianyi.data.model.entity.SysLog;

import java.util.Map;

@Mapper(config = MapperSpringConfig.class, unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface MapToSysLog extends Converter<Map<String, Object>, SysLog> {

    @SuppressWarnings("unchecked")
    default <T> T cast(Object o) {
        return (T) o;
    }
}
